package com.example.chatgpt.util;

import android.app.Activity;
import android.os.Build;
import android.view.View;

public class StatusBarUtil {

    //设置状态栏字体为黑色
    public static void setStatusBarTextColorBlack(Activity activity){
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            activity.getWindow().getDecorView()
                    .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }
    }

    public static void setStatusBarTextColorWhite(Activity activity){
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            activity.getWindow().getDecorView()
                    .setSystemUiVisibility(0);
        }
    }


}
